package cn.org.xuanguang.kepler.hormos.rdb.jpa;

import cn.org.xuanguang.kepler.core.enums.BaseStringEnum;
import org.beetl.sql.annotation.entity.EnumValue;

/**
 * 系统状态
 */
public enum State implements BaseStringEnum {

    NORMAL("0", "正常"),
    INVALID("2", "无效"),
    DELETED("1", "删除"),
    UPING("3", "上线"),
    DOWING("4", "下线"),
    PENDING("5", "待审核");
    @EnumValue
    private String name;
    private String desc;

    State(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        System.out.println(State.DELETED.getName());
    }

    @Override
    public String getValue() {
        return this.name;
    }
}
